<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Constructor</title>

    <style type="text/css">
        
    </style>

    <script type="text/javascript">
    //<![CDATA[
        function Tune(title, type) {
            this.title = title;
            this.type = type;
            this.getTile = function() {
                return "Song: "+ this.title + " Type: " + this.type;
            }
        }

        function Artist_tune(title, type, artist) {
            this.artist = artist;
            this.toString("Artist is " + artist);
            Tune.apply(this, arguments);
            this.toString = function() {
                return "Artist: " + this.artist + " " + this.getTile();
            }

        }

        window.onload = function() {
            Artist_tune.prototype = new Tune();

            var song = new Artist_tune("I want to hold your hand", "rock", "Beatles");
            document.writeln(song.toString());
        }
    //]]>
    </script>
    
</head>
<body>
    <p>some content</p>
</body>
</html>
